Integrand size = 43, antiderivative size = 259 \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=-\frac {B (b c-a d) i^2 n (c+d x)}{b^2 g^2 (a+b x)}+\frac {d^2 i^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^2}-\frac {(b c-a d) i^2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 g^2 (a+b x)}-\frac {B d (b c-a d) i^2 n \log (c+d x)}{b^3 g^2}-\frac {2 d (b c-a d) i^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^2}+\frac {2 B d (b c-a d) i^2 n \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^2} \]
-B*(-a*d+b*c)*i^2*n*(d*x+c)/b^2/g^2/(b*x+a)+d^2*i^2*(b*x+a)*(A+B*ln(e*((b* x+a)/(d*x+c))^n))/b^3/g^2-(-a*d+b*c)*i^2*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c ))^n))/b^2/g^2/(b*x+a)-B*d*(-a*d+b*c)*i^2*n*ln(d*x+c)/b^3/g^2-2*d*(-a*d+b* c)*i^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln(1-b*(d*x+c)/d/(b*x+a))/b^3/g^2+2 *B*d*(-a*d+b*c)*i^2*n*polylog(2,b*(d*x+c)/d/(b*x+a))/b^3/g^2
Time = 0.14 (sec) , antiderivative size = 233, normalized size of antiderivative = 0.90 \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\frac {i^2 \left (A b d^2 x-\frac {B (b c-a d)^2 n}{a+b x}+B d (-b c+a d) n \log (a+b x)+B d^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-\frac {(b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x}+2 d (b c-a d) \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+B d (-b c+a d) n \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )\right )}{b^3 g^2} \]
(i^2*(A*b*d^2*x - (B*(b*c - a*d)^2*n)/(a + b*x) + B*d*(-(b*c) + a*d)*n*Log [a + b*x] + B*d^2*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n] - ((b*c - a*d)^ 2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(a + b*x) + 2*d*(b*c - a*d)*Log[ a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + B*d*(-(b*c) + a*d)*n*(Lo g[a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2 , (d*(a + b*x))/(-(b*c) + a*d)])))/(b^3*g^2)
Time = 0.52 (sec) , antiderivative size = 235, normalized size of antiderivative = 0.91, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {2961, 2793, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c i+d i x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{(a g+b g x)^2} \, dx\) |
\(\Big \downarrow \) 2961 |
\(\displaystyle \frac {i^2 (b c-a d) \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}d\frac {a+b x}{c+d x}}{g^2}\) |
\(\Big \downarrow \) 2793 |
\(\displaystyle \frac {i^2 (b c-a d) \int \left (\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) d^2}{b^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}+\frac {2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) d}{b^2 (a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 (a+b x)^2}\right )d\frac {a+b x}{c+d x}}{g^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i^2 (b c-a d) \left (\frac {d^2 (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^3 (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}-\frac {2 d \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^3}-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^2 (a+b x)}+\frac {2 B d n \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b^3}+\frac {B d n \log \left (b-\frac {d (a+b x)}{c+d x}\right )}{b^3}-\frac {B n (c+d x)}{b^2 (a+b x)}\right )}{g^2}\) |
((b*c - a*d)*i^2*(-((B*n*(c + d*x))/(b^2*(a + b*x))) - ((c + d*x)*(A + B*L og[e*((a + b*x)/(c + d*x))^n]))/(b^2*(a + b*x)) + (d^2*(a + b*x)*(A + B*Lo g[e*((a + b*x)/(c + d*x))^n]))/(b^3*(c + d*x)*(b - (d*(a + b*x))/(c + d*x) )) + (B*d*n*Log[b - (d*(a + b*x))/(c + d*x)])/b^3 - (2*d*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - (b*(c + d*x))/(d*(a + b*x))])/b^3 + (2*B*d*n *PolyLog[2, (b*(c + d*x))/(d*(a + b*x))])/b^3))/g^2
3.2.22.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)* (x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && Integer Q[r]))
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol ] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q Subst[Int[x^m*((A + B*L og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
\[\int \frac {\left (d i x +c i \right )^{2} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{\left (b g x +a g \right )^{2}}d x\]
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\int { \frac {{\left (d i x + c i\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}}{{\left (b g x + a g\right )}^{2}} \,d x } \]
integral((A*d^2*i^2*x^2 + 2*A*c*d*i^2*x + A*c^2*i^2 + (B*d^2*i^2*x^2 + 2*B *c*d*i^2*x + B*c^2*i^2)*log(e*((b*x + a)/(d*x + c))^n))/(b^2*g^2*x^2 + 2*a *b*g^2*x + a^2*g^2), x)
Timed out. \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 1190 vs. \(2 (258) = 516\).
Time = 0.47 (sec) , antiderivative size = 1190, normalized size of antiderivative = 4.59 \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\text {Too large to display} \]
-B*c^2*i^2*n*(1/(b^2*g^2*x + a*b*g^2) + d*log(b*x + a)/((b^2*c - a*b*d)*g^ 2) - d*log(d*x + c)/((b^2*c - a*b*d)*g^2)) - A*(a^2/(b^4*g^2*x + a*b^3*g^2 ) - x/(b^2*g^2) + 2*a*log(b*x + a)/(b^3*g^2))*d^2*i^2 + 2*A*c*d*i^2*(a/(b^ 3*g^2*x + a*b^2*g^2) + log(b*x + a)/(b^2*g^2)) - B*c^2*i^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/(b^2*g^2*x + a*b*g^2) - A*c^2*i^2/(b^2*g^2*x + a*b *g^2) - (b^2*c^2*d*i^2*n + a*b*c*d^2*i^2*n - a^2*d^3*i^2*n)*B*log(d*x + c) /(b^4*c*g^2 - a*b^3*d*g^2) + ((b^3*c*d^2*i^2*log(e) - a*b^2*d^3*i^2*log(e) )*B*x^2 + (a*b^2*c*d^2*i^2*log(e) - a^2*b*d^3*i^2*log(e))*B*x - ((b^3*c^2* d*i^2*n - 2*a*b^2*c*d^2*i^2*n + a^2*b*d^3*i^2*n)*B*x + (a*b^2*c^2*d*i^2*n - 2*a^2*b*c*d^2*i^2*n + a^3*d^3*i^2*n)*B)*log(b*x + a)^2 + (2*(i^2*n + i^2 *log(e))*a*b^2*c^2*d - 3*(i^2*n + i^2*log(e))*a^2*b*c*d^2 + (i^2*n + i^2*l og(e))*a^3*d^3)*B + ((2*b^3*c^2*d*i^2*log(e) + (3*i^2*n - 4*i^2*log(e))*a* b^2*c*d^2 - 2*(i^2*n - i^2*log(e))*a^2*b*d^3)*B*x + (2*a*b^2*c^2*d*i^2*log (e) + (3*i^2*n - 4*i^2*log(e))*a^2*b*c*d^2 - 2*(i^2*n - i^2*log(e))*a^3*d^ 3)*B)*log(b*x + a) + ((b^3*c*d^2*i^2 - a*b^2*d^3*i^2)*B*x^2 + (a*b^2*c*d^2 *i^2 - a^2*b*d^3*i^2)*B*x + (2*a*b^2*c^2*d*i^2 - 3*a^2*b*c*d^2*i^2 + a^3*d ^3*i^2)*B + 2*((b^3*c^2*d*i^2 - 2*a*b^2*c*d^2*i^2 + a^2*b*d^3*i^2)*B*x + ( a*b^2*c^2*d*i^2 - 2*a^2*b*c*d^2*i^2 + a^3*d^3*i^2)*B)*log(b*x + a))*log((b *x + a)^n) - ((b^3*c*d^2*i^2 - a*b^2*d^3*i^2)*B*x^2 + (a*b^2*c*d^2*i^2 - a ^2*b*d^3*i^2)*B*x + (2*a*b^2*c^2*d*i^2 - 3*a^2*b*c*d^2*i^2 + a^3*d^3*i^...
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\int { \frac {{\left (d i x + c i\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}}{{\left (b g x + a g\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^2} \, dx=\int \frac {{\left (c\,i+d\,i\,x\right )}^2\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (a\,g+b\,g\,x\right )}^2} \,d x \]